<?php

namespace Wantuch\SurveyBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="comparisons")
 */
class Comparison
{
    /**
     * @ORM\Column(type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\Column(type="float",nullable=true)
     */
    protected $result;
    
    /**
     * @ORM\Column(type="string",nullable=true)
     */
    protected $compNumber;
    
    /**
     * @ORM\Column(type="datetime", nullable=true)
     */
    protected $createdAt;
    
    /**
     * @ORM\Column(type="datetime", nullable=true)
     */
    protected $updatedAt;
    
    /**
     * @ORM\ManyToOne(targetEntity="Invitation", inversedBy="comparisons")
     * @ORM\JoinColumn(name="invitation_id", referencedColumnName="id", nullable=true)
     **/
    private $invitation;
  
    /**
     * @ORM\ManyToOne(targetEntity="Product")
     * @ORM\JoinColumn(name="product1_id", referencedColumnName="id")
     **/
    private $product1;
    
    /**
     * @ORM\ManyToOne(targetEntity="Product")
     * @ORM\JoinColumn(name="product2_id", referencedColumnName="id")
     **/
    private $product2;
   

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set result
     *
     * @param float $result
     * @return Comparison
     */
    public function setResult($result)
    {
        $this->result = $result;

        return $this;
    }

    /**
     * Get result
     *
     * @return float 
     */
    public function getResult()
    {
        return $this->result;
    }

    /**
     * Set createdAt
     *
     * @param \DateTime $createdAt
     * @return Comparison
     */
    public function setCreatedAt($createdAt)
    {
        $this->createdAt = $createdAt;

        return $this;
    }

    /**
     * Get createdAt
     *
     * @return \DateTime 
     */
    public function getCreatedAt()
    {
        return $this->createdAt;
    }

    /**
     * Set updatedAt
     *
     * @param \DateTime $updatedAt
     * @return Comparison
     */
    public function setUpdatedAt($updatedAt)
    {
        $this->updatedAt = $updatedAt;

        return $this;
    }

    /**
     * Get updatedAt
     *
     * @return \DateTime 
     */
    public function getUpdatedAt()
    {
        return $this->updatedAt;
    }

    /**
     * Set invitation
     *
     * @param \Wantuch\SurveyBundle\Entity\Invitation $invitation
     * @return Comparison
     */
    public function setInvitation(\Wantuch\SurveyBundle\Entity\Invitation $invitation = null)
    {
        $this->invitation = $invitation;

        return $this;
    }

    /**
     * Get invitation
     *
     * @return \Wantuch\SurveyBundle\Entity\Invitation 
     */
    public function getInvitation()
    {
        return $this->invitation;
    }

    /**
     * Set product1
     *
     * @param \Wantuch\SurveyBundle\Entity\Product $product1
     * @return Comparison
     */
    public function setProduct1(\Wantuch\SurveyBundle\Entity\Product $product1 = null)
    {
        $this->product1 = $product1;

        return $this;
    }

    /**
     * Get product1
     *
     * @return \Wantuch\SurveyBundle\Entity\Product 
     */
    public function getProduct1()
    {
        return $this->product1;
    }

    /**
     * Set product2
     *
     * @param \Wantuch\SurveyBundle\Entity\Product $product2
     * @return Comparison
     */
    public function setProduct2(\Wantuch\SurveyBundle\Entity\Product $product2 = null)
    {
        $this->product2 = $product2;

        return $this;
    }

    /**
     * Get product2
     *
     * @return \Wantuch\SurveyBundle\Entity\Product 
     */
    public function getProduct2()
    {
        return $this->product2;
    }

    /**
     * Set compNumber
     *
     * @param string $compNumber
     * @return Comparison
     */
    public function setCompNumber($compNumber)
    {
        $this->compNumber = $compNumber;

        return $this;
    }

    /**
     * Get compNumber
     *
     * @return string 
     */
    public function getCompNumber()
    {
        return $this->compNumber;
    }
}
